#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll n;
ll book[100007];
set<ll> s;
ll a[100007];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        ll x;
        cin>>x;
        s.insert(x);
        book[x]++;
    }
    ll tot=0;
    for(auto i=s.begin();i!=s.end();i++){
        a[++tot]=*i;
    }
    ll sum=0;
    for(int i=2;i<=tot;i++){
        n-=min(book[a[i]],book[a[i-1]]+sum);
        sum=book[a[i-1]]+sum-min(book[a[i]],book[a[i-1]]+sum);
    }
    cout<<n;
    return 0;
}
